frappe.listview_settings['Job Card'] = {
    onload: function (listview) {
        frappe.db.get_single_value("Light Mes Settings", "enable_tracking_number")
        .then(r =>{
            if (r && r===1){
                var df = {
                        doctype:"Tracking Detail",
                        fieldname: "tracking_number",
                        label:"Tracking Number",
                        fieldtype: "Link",
                        options:"Tracking Number",
                        onchange: function(){
                            listview.start = 0;
                            listview.refresh();
                            listview.on_filter_change();
                        },
                }
                listview.page.add_field(df, listview.filter_area.standard_filters_wrapper);
            }
        })
    }
};